home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 114 / macaddict114.cdr / Software / Graphics & Multimedia / DeBabelizerServerOSX.dmg / Packages / MediaRichBase.pkg / Contents / Resources / preinstall < prev    next >
Encoding:
Text File  |  2005-09-08  |  617 b   |  34 lines

  1. #!/usr/bin/perl
  2.  
  3. sub logit
  4. {
  5.     open F, ">/tmp/preinstall.log";
  6.     print F $_[0] . "\n";
  7.     close F;
  8. }
  9.  
  10. my $isUpgrade = ($ARGV[4] eq "preupgrade");
  11.  
  12. system("systemstarter stop MediaRichMediaGenerator");
  13. system("systemstarter stop MediaRichSystemMonitor");
  14.  
  15. my @sysdirs = (
  16.     "/",
  17.     "/Library",
  18.     "/Library/StartupItems",
  19.     "/Applications",
  20.     );
  21.  
  22. my $perms = "";
  23. foreach $d (@sysdirs)
  24. {
  25.     my @stats = stat($d);
  26.     my $mode = sprintf("%05o", $stats[2] & 07777);
  27.     my $uid = $stats[4];
  28.     my $gid = $stats[5];
  29.     $perms .= ($perms? "," : "") . "$d,$mode:$uid:$gid";
  30. }
  31. open F, ">/tmp/.__MR_PERMS__";
  32. print F $perms;
  33. close F;
  34.